package xiangya.bysj.online;


public class OnlineDoctor implements Comparable<OnlineDoctor> {
	
	//药师id
 	private String doctorid;
 	
 	//最后一次确认时间
 	private long lastKeepTouch;
 	//已丢失确认几次
 	private int count=0;
 	//该药师的服务分 
 	private double cent=0;
	@Override
	public boolean equals(Object obj) {
		return this.doctorid.equals(((OnlineDoctor)obj).getDoctorid());
	}


	


	/**
	 * 为排序做准备 
	 */
	@Override
	public int compareTo(OnlineDoctor o) {
		
		int result=0;
		
		result = this.cent > o.getCount() ?1:-1;
		
		
		return result;
	}

	public String getDoctorid() {
		return doctorid;
	}

	
	
	
	public int getCount() {
		return count;
	}




	public void setCount(int count) {
		this.count = count;
	}




	




	public double getCent() {
		return cent;
	}




	public void setCent(double cent) {
		this.cent = cent;
	}




	public void setDoctorid(String doctorid) {
		this.doctorid = doctorid;
	}

	public long getLastKeepTouch() {
		return lastKeepTouch;
	}

	public void setLastKeepTouch(long lastKeepTouch) {
		this.lastKeepTouch = lastKeepTouch;
	}



	@Override
	public int hashCode() {
		
		return this.doctorid.hashCode();
	}








	

 	 
}
